package com.zjt.spring.boot.learn3.mapper;

import com.zjt.spring.boot.learn3.model.dto.UserDataDto;
import com.zjt.spring.boot.learn3.model.entity.User;
import com.zjt.spring.boot.learn3.model.vo.UserDataVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    @Select("select * from user")
    List<UserDataVO> getUserListTest(UserDataDto requestDto);

    List<UserDataVO> getUserList(@Param("dto") UserDataDto requestDto);

    UserDataVO getUserDetailById(@Param("req") UserDataDto requestDto);

    int insertUser(@Param("user") User user);

    int insertUsers(@Param("usersLst") List<User> users);

    Boolean updateUser(@Param("dto") UserDataDto userDataDto);

    Boolean deleteUserById(@Param("id") Integer id);
}
